import http from "../utils/request";
//获取影片列表
export const getFilmList = (num = 1) => {
  return http.get("/api/film/search", {
    params: {
      pagesize: 10,
      status: "正在热映",
      pagenum: num,
    },
  });
};

//即将上线的影片
export const getCommingSoon = (num=1) =>
  http.get("/api/film/search", {
    params: { 
      pagesize: 10,
      status: "即将上映",
      pagenum: num,
     },
  });

//详情页
export const getFilmInfo = (id) => {
  return http.get("/api/film/zhao", {
    params: {
      id,
    },
  });
};

export const getNews =(_id)=>{
  if(_id){
   return http.get("/api/article/search",{
      params:{_id}
    })
  }else {
    return http.get("/api/article/search")
  }
}